package com.bootdo.output.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.bootdo.output.dao.OutStorageDao;
import com.bootdo.output.domain.OutStorageDO;
import com.bootdo.output.service.OutStorageService;



@Service
public class OutStorageServiceImpl implements OutStorageService {
	@Autowired
	private OutStorageDao outStorageDao;
	
	@Override
	public OutStorageDO get(Long outstorageId){
		return outStorageDao.get(outstorageId);
	}
	
	@Override
	public List<OutStorageDO> list(Map<String, Object> map){
		return outStorageDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return outStorageDao.count(map);
	}
	
	@Override
	public int save(OutStorageDO outStorage){
		return outStorageDao.save(outStorage);
	}
	
	@Override
	public int update(OutStorageDO outStorage){
		return outStorageDao.update(outStorage);
	}
	
	@Override
	public int remove(Long outstorageId){
		return outStorageDao.remove(outstorageId);
	}
	
	@Override
	public int batchRemove(Long[] outstorageIds){
		return outStorageDao.batchRemove(outstorageIds);
	}

	@Override
	public int batchUpdate(Long[] id) {
		// TODO Auto-generated method stub
		return outStorageDao.batchUpdate(id);
	}
	/**
	 * 获取状态列表
	 */
	@Override
	public List<OutStorageDO> listStatus() {
		
		return outStorageDao.listStatus();
	}
	/**
	 * 根据状态查询
	 */
	@Override
	public List<OutStorageDO> listByStatus(String status) {
		
		 Map<String, Object> param = new HashMap<>();
	        param.put("status", status);
	        return outStorageDao.list(param);

	}
	
}
